﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SmartMD.DataAccess.Oracle;
using System.Data;
using SmartMD.DataModel.Entity;
using SmartMD.DataAccess.Postgresql;

namespace SmartMD.DataAccess.Oracle.DaoImpl
{
    public class BaseGenericDaoImpl
    {
        public IConnection dbConn = null;

        public BaseGenericDaoImpl()
        {
            XMLHelper xmlOper = new XMLHelper();
            String dataProvider = xmlOper.GetXmlNodeAttribute("SmartMD.Manager.vshost.exe.config", "configuration/appSettings/add[@key='dataProvider']", "value");
            if (dataProvider == "Oracle")
            {
                dbConn = ConnectDatabase.getInstance();
            }
            else
            {
                dbConn = DbConnection.getInstance();
            }
        }

    }
}
